package com.cvte.sunkit

import android.annotation.SuppressLint
import java.text.SimpleDateFormat
import java.util.Date

//@RequiresApi(Build.VERSION_CODES.O)
//@SuppressLint("SimpleDateFormat")
//fun main(){
//    val currentSystem=System.currentTimeMillis()
//    val instant=Instant.ofEpochMilli(currentSystem)
//    val localDateTime=LocalDateTime.ofInstant(instant, ZoneId.systemDefault())
//    println(localDateTime)
//
//    val date=Date(currentSystem)
//    println(date)
//    val pattern="yyyy_MM_dd_HH_mm_ss"
//    val sdf=SimpleDateFormat(pattern)
//    val formattedDateTime=sdf.format(date)
//    println(formattedDateTime)
//}

fun main(args:Array<String>){
//    println("hello world!")
//    val time=System.currentTimeMillis()
//    println(shiftTimeFormat(1690364465773))
//    println(shiftTimeFormat(1690364465773-86400000))
    println(tanslate())
}

@SuppressLint("SimpleDateFormat")
private fun shiftTimeFormat(currentTime:Long):String{
    val date= Date(currentTime)
    val pattern="MM/dd_HH:mm:ss"
    val sdf= SimpleDateFormat(pattern)
    val formattedDateTime=sdf.format(date)
    return formattedDateTime.toString()
}

fun tanslate():Int{
    val num1="00025bee".toLong(16)
    val num2="00025bfe".toLong(16)

    return (num2-num1).toInt()
}